<div>
  <metal:block define-macro="foo">
    <span tal:define="global test 'value'"/>
    <span tal:replace="test"/>
  </metal:block>

  <div metal:use-macro="foo"/>
</div>
